<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="/css/editthings.css" />
	<script type="text/javascript" src="/js/ckeditor/ckeditor.js" language="javascript" ></script>
	<link rel="stylesheet" type="text/css" href="/css/tabLanguages.css" />
	<script src="/js/admin/jquery/jquery-1.6.1.min.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="/js/admin/jquery/ui/themes/ui-lightness/jquery.ui.all.css" />
	<script src="/js/admin/jquery/ui/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/ui/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/tab.js" type="text/javascript"></script>
	<script src="/js/admin/jquery/superfish/js/superfish.js" type="text/javascript"></script>
</head>
<body>
<?php if($this->error == 6){?>
<center><?php echo $this->textError2;?></center>
				<?php } else if($this->error == 1){?>
					<script type="text/javascript">
						window.parent.$.prettyPhoto.close();
						window.top.location.reload();
						window.parent.$.prettyPhoto.close();
					</script>
				<?php } else {?>
				<form method="post" action="/listshow/insertqa?action=new" name="form_edit_product" id="form_edit_product">
					
					<div class="content_btn" style="float: right">
						<div class="submit">
							<input type="submit" value="<?php echo $this->textSave?>" name="submit" class="edit_submit">
						</div>
					</div>
					<div><p><?php echo $this->TitlePost ?></p></div>
					<div style="clear: both;"></div>
					<div class="line"><hr></div>
					<?php if($this->error == -1){?><h4 style="color:red"><?php echo $this->textError8 ?></h2><?php }?>
					<?php if($this->error == 5){?><h4 style="color:red"><?php echo $this->textError10 ?></h2><?php }?>
					
					<div class="content_row">
						<div class="content_row_l">
							<p><?php echo $this->QaCategory ?>
								<span><?php echo $this->category_name;?></span>
								<input type="hidden" name="QA_category" id="QA_category" value="<?php echo $this->category_id;?>" readonly />
							</p>
							 <?php if($this->error == 6){?><h4 style="color:red;margin-top: -15px;height: 10px;"><?php echo $this->CateNotFound ?></h4><?php }?>
						</div>
					</div>
					
					<div id="languages" class="htabs">
						<a tab="#language0" class="selected"><?php echo 'Default'; ?></a>
						<?php foreach ($this->languages as $language) { ?>
						<a tab="#language<?php echo $language['language_id']; ?>"><?php echo $language['name']; ?></a>
						<?php } ?>
					</div>
					
				<div id="language0">
					<div class="content_row">
						<div class="content_row_l">
							<p><?php echo $this->QaTitle ?> <input type="text" value="<?php echo $this->title["Default"];?>" size="30" maxlength="30" name="QA_title[Default]" id="QA_title[Default]" class="content_input"/></p>
							<?php if(isset($this->error_desc['Default'][0])){?><h4 style="color:red;margin-top: -15px;height: 10px;"><?php echo $this->textError9 ?></h4><?php }?>
						</div>
						</div>
					<div style="clear:both;"></div>
					
					<div class="content_row">
						<div class="content_row_l"><p><?php echo $this->QAContent ?></p></div>
						<?php if(isset($this->error_desc['Default'][1])){?><h4 style="color:red;margin-top: -15px;height: 10px;"><?php echo $this->textError11 ?></h4><?php }?>
						<div class="content_row_r">
							<textarea name="QA_description[Default]" class="ckeditor" style="visibility: hidden; display: none;"><?php echo $this->description["Default"];?></textarea>
						</div>
					</div>
				</div>
				
				<?php foreach ($this->languages as $language) { ?>
				<div id="language<?php echo $language['language_id']; ?>">
					<div class="content_row">
						<div class="content_row_l">
							<p><?php echo $this->QaTitle ?> <input type="text" value="<?php echo $this->title[$language['name']];?>" size="30" maxlength="30" name="QA_title[<?php echo $language['name'];?>]" id="QA_title[<?php echo $language['name'];?>]" class="content_input"/></p>
							<?php if(isset($this->error_desc[$language['name']][0])){?><h4 style="color:red;margin-top: -15px;height: 10px;"><?php echo $this->textError9 ?></h4><?php }?>
						</div>
						</div>
					<div style="clear:both;"></div>
					
					<div class="content_row">
						<div class="content_row_l"><p><?php echo $this->QAContent ?></p></div>
						<?php if(isset($this->error_desc[$language['name']][1])){?><h4 style="color:red;margin-top: -15px;height: 10px;"><?php echo $this->textError11 ?></h4><?php }?>
						<div class="content_row_r">
							<textarea name="QA_description[<?php echo $language['name'];?>]" class="ckeditor" style="visibility: hidden; display: none;"><?php echo $this->description[$language['name']];?></textarea>
						</div>
					</div>
				</div>
				<?php }?>
				
				</form>
<script type="text/javascript"><!--
$.tabs('#languages a'); 
//--></script>
				<?php }?>
</body>		
</html>		